﻿using MangoMes.MVC.Commands;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace MangoMes.MVC.Controllers
{
    public class MenuController : Controller
    {

        private readonly IpAddressesConfig _ipAddressesConfig;

        public MenuController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }
        public IActionResult Index()
        {
            return View();
        }
        /// <summary>
        /// 菜单
        /// </summary>
        /// <returns></returns>
        public IActionResult Menu()
        {
            ViewBag.MVCIp = _ipAddressesConfig.MVCIp;
            return View();
        }
        /// <summary>
        /// 登录页面
        /// </summary>
        /// <returns></returns>
        public IActionResult Login()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.MVCIp = _ipAddressesConfig.MVCIp;
            return View();
        }
        /// <summary>
        /// 权限添加页面
        /// </summary>
        /// <returns></returns>
        public IActionResult PerpossionCreate()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            return View();
        }
        /// <summary>
        /// 权限列表页面
        /// </summary>
        /// <returns></returns>
        public IActionResult PerpossionList()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            return View();
        }
        /// <summary>
        /// 角色添加页面
        /// </summary>
        /// <returns></returns>
        public IActionResult RolesCreateView()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            return View();
        }
        /// <summary>
        /// 角色列表页面
        /// </summary>
        /// <returns></returns>
        public IActionResult RolesListView()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            return View();
        }
        /// <summary>
        /// 用户添加页面
        /// </summary>
        /// <returns></returns>
        public IActionResult UserCreateView()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            return View();
        }
        /// <summary>
        /// 用户列表页面
        /// </summary>
        /// <returns></returns>
        public IActionResult UserListView()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            return View();
        }
    }
}
